package io;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Scanner;

public class IoDemo10 {

    public static void main(String[] args) {
        try (InputStream inputStream = new FileInputStream("d:/test.txt")) {
            Scanner scanner = new Scanner(inputStream);
            // 此时读的就是文件里的内容
            scanner.next();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
